# Contributor: Sean McAvoy <seanmcavoy@gmail.com>
# Maintainer: Sean McAvoy <seanmcavoy@gmail.com>
pkgname=py3-installer
pkgver=0.5.1
pkgrel=1
pkgdesc="low-level library for installing from a Python wheel distribution"
url="https://github.com/pypa/installer"
arch="noarch"
license="MIT"
depends="python3"
checkdepends="py3-pytest"
source="https://files.pythonhosted.org/packages/source/i/installer/installer-$pkgver.tar.gz
	default-bytecode-levels.patch
	"
builddir="$srcdir/installer-$pkgver"
# checkdepends causes weird circular behaviour,
# because py3-pytest depends on this down the chain
options="!check"

build() {
	python3 setup.py build
}

check() {
	PYTHONPATH="$builddir/build/lib:$PYTHONPATH" pytest
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
fcdbd0001c8b87cb73f49453c7be30c52579eec6d9134b8e9406aab59bfdf7899360fbbe9cc37c9db54356e5408322aea80307d73231b136918f7d2af013afd1  installer-0.5.1.tar.gz
fa5046b07cd4dcb04d3112c6a24ad613b77213c98e2e8b33994cc8f8fe4acae1460d4efd9610a6d9b61dd896fb02c18cd7d0b8890c4d174fb52e9d04dcbef95d  default-bytecode-levels.patch
"
